﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
  xmlns:input="clr-namespace:System.Windows.Controls">

  <Style TargetType="input:RangeTimePickerPopup">
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="PopupMinutesInterval" Value="5" />
    <Setter Property="PopupSecondsInterval" Value="0" />
    <Setter Property="Height" Value="300" />
    <Setter Property="HorizontalAlignment" Value="Stretch" />
    <Setter Property="Background" Value="White" />
    <Setter Property="SliderStyle">
      <Setter.Value>
        <Style TargetType="Slider">
          <Setter Property="Orientation" Value="Vertical" />
          <Setter Property="HorizontalAlignment" Value="Center" />
        </Style>
      </Setter.Value>
    </Setter>
    <Setter Property="TimeButtonStyle">
      <Setter.Value>
        <Style
          TargetType="Button">
          <Setter
            Property="Template">
            <Setter.Value>
              <ControlTemplate
                TargetType="Button">
                <TextBlock x:Name="label"
                  Text="{TemplateBinding Content}"
                  Foreground="Black"
                  Margin="0"
                  Padding="0">
                  <vsm:VisualStateManager.VisualStateGroups>
                    <!-- common states -->
                    <vsm:VisualStateGroup
                            x:Name="CommonStates">
                      <vsm:VisualState
                              x:Name="Normal" />
                      <vsm:VisualState
                              x:Name="Disabled">
                        <Storyboard>
						              <ColorAnimationUsingKeyFrames
                            BeginTime="00:00:00"
                            Duration="00:00:00.0010000"
                            Storyboard.TargetName="label"
                            Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)">
							              <SplineColorKeyFrame
                              KeyTime="00:00:00"
                              Value="Gray" />
						              </ColorAnimationUsingKeyFrames>
                        </Storyboard>
                      </vsm:VisualState>
                    </vsm:VisualStateGroup>
                  </vsm:VisualStateManager.VisualStateGroups>
                </TextBlock>
              </ControlTemplate>
            </Setter.Value>
          </Setter>
        </Style>
      </Setter.Value>
    </Setter>
    <!--<Setter Property="TabNavigation" Value="Cycle" />-->
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="input:RangeTimePickerPopup">
          <Grid Background="{TemplateBinding Background}" >
            <vsm:VisualStateManager.VisualStateGroups>
              
              <!-- Common States -->
              <vsm:VisualStateGroup x:Name="CommonStates">
                <vsm:VisualStateGroup.Transitions>
                  <vsm:VisualTransition GeneratedDuration="0"/>
                </vsm:VisualStateGroup.Transitions>
                <vsm:VisualState x:Name="Normal"/>
                <vsm:VisualState x:Name="Disabled">
                </vsm:VisualState>
              </vsm:VisualStateGroup>
              <vsm:VisualStateGroup x:Name="FocusStates">
                <vsm:VisualState x:Name="Focused">
                </vsm:VisualState>
                <vsm:VisualState x:Name="Unfocused"/>
              </vsm:VisualStateGroup>
              
              <!-- Contained States -->
              <vsm:VisualStateGroup x:Name="ContainedByPickerStates">
                <vsm:VisualState x:Name="Contained">
                </vsm:VisualState>
                <vsm:VisualState x:Name="NotContained">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Commit" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="Cancel" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </vsm:VisualState>
              </vsm:VisualStateGroup>
              
              <!-- PopupModeStates -->
              <vsm:VisualStateGroup x:Name="PopupModeStates">
                <vsm:VisualState x:Name="AllowSecondsAndDesignatorsSelection">
                </vsm:VisualState>
                <vsm:VisualState x:Name="AllowTimeDesignatorsSelection">
                </vsm:VisualState>
                <vsm:VisualState x:Name="AllowSecondsSelection">
                </vsm:VisualState>
                <vsm:VisualState x:Name="HoursAndMinutesOnly">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames 
                      Storyboard.TargetName="SecondsPanel" 
                      Storyboard.TargetProperty="(UIElement.Visibility)" 
                      Duration="0">
                      <DiscreteObjectKeyFrame 
                        KeyTime="0" 
                        Value="Collapsed" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames 
                      Storyboard.TargetName="SecondsSlider" 
                      Storyboard.TargetProperty="(UIElement.Visibility)" 
                      Duration="0">
                      <DiscreteObjectKeyFrame 
                        KeyTime="0" 
                        Value="Collapsed" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </vsm:VisualState>
              </vsm:VisualStateGroup>
            </vsm:VisualStateManager.VisualStateGroups>
            
            <Grid.Resources>
              <Style x:Key="CommitButton" TargetType="Button">
                <Setter Property="Background" Value="#FF1F3B53"/>
                <Setter Property="Foreground" Value="#FF000000"/>
                <Setter Property="Padding" Value="3"/>
                <Setter Property="BorderThickness" Value="1"/>
                <Setter Property="BorderBrush">
                  <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                      <GradientStop Color="#FFA3AEB9" Offset="0"/>
                      <GradientStop Color="#FF8399A9" Offset="0.375"/>
                      <GradientStop Color="#FF718597" Offset="0.375"/>
                      <GradientStop Color="#FF617584" Offset="1"/>
                    </LinearGradientBrush>
                  </Setter.Value>
                </Setter>
                <Setter Property="Template">
                  <Setter.Value>
                    <ControlTemplate TargetType="Button">
                      <Grid FlowDirection="LeftToRight">
                        <vsm:VisualStateManager.VisualStateGroups>
                          <vsm:VisualStateGroup x:Name="CommonStates">
                            <vsm:VisualState x:Name="Normal"/>
                            <vsm:VisualState x:Name="MouseOver">
                              <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                  <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                  <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
                                </ColorAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                  <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
                                </ColorAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                  <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
                                </ColorAnimationUsingKeyFrames>
                              </Storyboard>
                            </vsm:VisualState>
                            <vsm:VisualState x:Name="Pressed">
                              <Storyboard>
                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                  <SplineColorKeyFrame KeyTime="0" Value="#FF6DBDD1"/>
                                </ColorAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                  <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                  <SplineColorKeyFrame KeyTime="0" Value="#D8FFFFFF"/>
                                </ColorAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                  <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
                                </ColorAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                  <SplineColorKeyFrame KeyTime="0" Value="#8CFFFFFF"/>
                                </ColorAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                  <SplineColorKeyFrame KeyTime="0" Value="#3FFFFFFF"/>
                                </ColorAnimationUsingKeyFrames>
                              </Storyboard>
                            </vsm:VisualState>
                            <vsm:VisualState x:Name="Disabled">
                              <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                  <SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
                                </DoubleAnimationUsingKeyFrames>
                              </Storyboard>
                            </vsm:VisualState>
                          </vsm:VisualStateGroup>
                          <vsm:VisualStateGroup x:Name="FocusStates">
                            <vsm:VisualState x:Name="Focused">
                              <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
                                  <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                              </Storyboard>
                            </vsm:VisualState>
                            <vsm:VisualState x:Name="Unfocused"/>
                          </vsm:VisualStateGroup>
                        </vsm:VisualStateManager.VisualStateGroups>
                        <Border x:Name="Background" Background="White" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3">
                          <Grid Margin="1" Background="{TemplateBinding Background}">
                            <Border x:Name="BackgroundAnimation" Opacity="0" Background="#FF448DCA"/>
                            <Rectangle x:Name="BackgroundGradient">
                              <Rectangle.Fill>
                                <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                  <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                  <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                  <GradientStop Color="#E5FFFFFF" Offset="0.625"/>
                                  <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                </LinearGradientBrush>
                              </Rectangle.Fill>
                            </Rectangle>
                            <Grid Margin="5.125,3.5,3.125,3.5">
                              <Path Height="6" HorizontalAlignment="Left" Margin="0.376,0,0,0" VerticalAlignment="Top" Width="6.861" Stretch="Fill" StrokeDashCap="Round" StrokeEndLineCap="Round" StrokeStartLineCap="Round" StrokeThickness="1.5" Data="M6.0443821,10.103714 L7.7407737,20.549189 M21.739996,1.5 L7.6783452,20.497122">
                                <Path.Stroke>
                                  <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF67CA0A"/>
                                    <GradientStop Color="#FF498C38" Offset="1"/>
                                    <GradientStop Color="#FF29EE5B" Offset="0.375"/>
                                  </LinearGradientBrush>
                                </Path.Stroke>
                                <Path.Fill>
                                  <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF000000"/>
                                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                  </LinearGradientBrush>
                                </Path.Fill>
                              </Path>
                            </Grid>
                          </Grid>
                        </Border>
                        <Rectangle x:Name="DisabledVisualElement" IsHitTestVisible="false" Opacity="0" Fill="#FFFFFFFF" RadiusX="3" RadiusY="3"/>
                        <Rectangle Margin="0.936,0.904,1.064,1.096" x:Name="FocusVisualElement" IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                      </Grid>
                    </ControlTemplate>
                  </Setter.Value>
                </Setter>
              </Style>
              <Style x:Key="CancelButton" TargetType="Button">
                <Setter Property="Background" Value="#FF1F3B53"/>
                <Setter Property="Foreground" Value="#FF000000"/>
                <Setter Property="Padding" Value="3"/>
                <Setter Property="BorderThickness" Value="1"/>
                <Setter Property="BorderBrush">
                  <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                      <GradientStop Color="#FFA3AEB9" Offset="0"/>
                      <GradientStop Color="#FF8399A9" Offset="0.375"/>
                      <GradientStop Color="#FF718597" Offset="0.375"/>
                      <GradientStop Color="#FF617584" Offset="1"/>
                    </LinearGradientBrush>
                  </Setter.Value>
                </Setter>
                <Setter Property="Template">
                  <Setter.Value>
                    <ControlTemplate TargetType="Button">
                      <Grid FlowDirection="LeftToRight">
                        <vsm:VisualStateManager.VisualStateGroups>
                          <vsm:VisualStateGroup x:Name="CommonStates">
                            <vsm:VisualState x:Name="Normal"/>
                            <vsm:VisualState x:Name="MouseOver">
                              <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                  <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                  <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
                                </ColorAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                  <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
                                </ColorAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                  <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
                                </ColorAnimationUsingKeyFrames>
                              </Storyboard>
                            </vsm:VisualState>
                            <vsm:VisualState x:Name="Pressed">
                              <Storyboard>
                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                  <SplineColorKeyFrame KeyTime="0" Value="#FF6DBDD1"/>
                                </ColorAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                  <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                  <SplineColorKeyFrame KeyTime="0" Value="#D8FFFFFF"/>
                                </ColorAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                  <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
                                </ColorAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                  <SplineColorKeyFrame KeyTime="0" Value="#8CFFFFFF"/>
                                </ColorAnimationUsingKeyFrames>
                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                  <SplineColorKeyFrame KeyTime="0" Value="#3FFFFFFF"/>
                                </ColorAnimationUsingKeyFrames>
                              </Storyboard>
                            </vsm:VisualState>
                            <vsm:VisualState x:Name="Disabled">
                              <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                  <SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
                                </DoubleAnimationUsingKeyFrames>
                              </Storyboard>
                            </vsm:VisualState>
                          </vsm:VisualStateGroup>
                          <vsm:VisualStateGroup x:Name="FocusStates">
                            <vsm:VisualState x:Name="Focused">
                              <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
                                  <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                              </Storyboard>
                            </vsm:VisualState>
                            <vsm:VisualState x:Name="Unfocused"/>
                          </vsm:VisualStateGroup>
                        </vsm:VisualStateManager.VisualStateGroups>
                        <Border x:Name="Background" Background="White" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3">
                          <Grid Margin="1" Background="{TemplateBinding Background}">
                            <Border x:Name="BackgroundAnimation" Opacity="0" Background="#FF448DCA"/>
                            <Rectangle x:Name="BackgroundGradient">
                              <Rectangle.Fill>
                                <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                  <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                  <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                  <GradientStop Color="#E5FFFFFF" Offset="0.625"/>
                                  <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                </LinearGradientBrush>
                              </Rectangle.Fill>
                            </Rectangle>
                            <Grid Margin="5.125,3.5,3.125,3.5">
                              <Path Height="6" HorizontalAlignment="Left" Margin="-1.25,0,0,0" VerticalAlignment="Top" Width="7.75" Fill="#FF000000" Stretch="Fill" StrokeDashCap="Round" StrokeEndLineCap="Round" StrokeStartLineCap="Round" StrokeThickness="1.5" Data="M2.5,1.5000099 L20.5,19.50001 M21.739996,1.5 L1.5,19.883999">
                                <Path.Stroke>
                                  <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFEA7525"/>
                                    <GradientStop Color="#FFDA715B" Offset="0.371"/>
                                    <GradientStop Color="#FFB72909" Offset="1"/>
                                  </LinearGradientBrush>
                                </Path.Stroke>
                              </Path>
                            </Grid>
                          </Grid>
                        </Border>
                        <Rectangle x:Name="DisabledVisualElement" IsHitTestVisible="false" Opacity="0" Fill="#FFFFFFFF" RadiusX="3" RadiusY="3"/>
                        <Rectangle Margin="0.936,0.904,1.064,1.096" x:Name="FocusVisualElement" IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                      </Grid>
                    </ControlTemplate>
                  </Setter.Value>
                </Setter>
              </Style>
            </Grid.Resources>
            
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
              
            <Grid HorizontalAlignment="Center" Margin="6">
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
              </Grid.ColumnDefinitions>
              
              <Slider x:Name="HoursSlider"
                      Grid.Column="0"
                      Style="{TemplateBinding SliderStyle}"
                      Margin="5"
                      Minimum="0" 
                      Maximum="23" /> 
              <Grid x:Name="HoursPanel" Margin="5" Grid.Column="1"/>

              <Slider x:Name="MinutesSlider" 
                      Grid.Column="2"
                      Style="{TemplateBinding SliderStyle}" 
                      SmallChange="{TemplateBinding PopupMinutesInterval}"
                      Margin="5"
                      Minimum="0" 
                      Maximum="59" />
              <Grid x:Name="MinutesPanel" Margin="5" Grid.Column="3" />

              <Slider x:Name="SecondsSlider" 
                      Grid.Column="4"
                      Style="{TemplateBinding SliderStyle}" 
                      SmallChange="{TemplateBinding PopupSecondsInterval}"
                      Margin="5"
                      Minimum="0" 
                      Maximum="59" />
              <Grid x:Name="SecondsPanel" Margin="5" Grid.Column="5" />

              <StackPanel Grid.Column="6" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="12,0,0,0">
                <Button x:Name="Commit" Margin="0,15,0,0" HorizontalAlignment="Right" TabIndex="2" Style="{StaticResource CommitButton}" />
                <Button x:Name="Cancel" Margin="0,15,0,0" HorizontalAlignment="Right" TabIndex="3" Style="{StaticResource CancelButton}" />
              </StackPanel>
            </Grid>
              
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>